Bitmaps and View Devices
When you draw a shape, QuickDraw GX applies the information in the shape's style, ink, and transform objects to the shape's geometry and then renders the shape to the display devices that correspond to the view information contained in the shape's transform object.The transform object of a shape contains a list of view ports to which QuickDraw GX should draw the shape. Each view port exists in the coordinate space of a specific view group, and each view group contains view devices that share the same coordinate space. QuickDraw GX determines where the shape appears in the coordinate space of each view group. If the area of the shape when drawn overlaps the area covered by any view device in that view group, QuickDraw GX renders the shape into the bitmap attached to that view device.
Figure 5-7 depicts how this drawing mechanism works with four shapes: a polygon shape, a path shape, a bitmap shape, and a text shape. The two path shapes share one transform object and the bitmap shape and the text shape share a second transform object.
Both of the transform objects contain one view port in their view port list. That view port exists in a view group that also contains a view device. The view device has a bitmap shape associated with it to hold the renderings of shapes drawn to it.
Figure 5-7 Bitmaps and view devices
Whenever you draw a QuickDraw GX shape, you are using this view architecture to render the shape to a display device. You can also use this view architecture to draw shapes into an offscreen bitmap--a bitmap that is not associated with a physical display device.
The section "Creating Bitmaps Offscreen,"which begins on page 5-45, shows how you can create an offscreen bitmap, draw shapes into it, and then draw it to the screen.
You can find more information about the QuickDraw GX view architecture in the chapter "View-Related Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help